/**
 * @author williamJM
 * date 2018/05/10 10:22
 */

"use strict";

define(["app","config/pathConfig","Init"],function (app, pathConfig,Init) {
    app.registerController("ctrl.index",function ($rootScope,$state,$http,$scope) {

        Init.init();

        //退出系统
        $rootScope.logout = function () {
            $http.get(pathConfig.backstagePath.getPath() + "/logout")
                .then(function successCallback() {
                    sessionStorage.removeItem("currentUserInfo");
                    $state.go("login");
                })
        };

        //锁定屏幕
        $rootScope.lockScreen = function () {
            $state.go("lock");
            sessionStorage.setItem("locked","true");
        };



    });
});